SKS-2344: Fix issue when cleaning unused CloudTower labels created by CAPE every 24h #168
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
问题:集群节点虚拟机标签丢失。
定位:#167 定时清理标签没有加上 TotalNum = 0 的条件。
Change
定时清理标签补上 TotalNum = 0 的条件。
Test
运行程序前,已有的标签如下:
运行程序后,剩余标签如下:
sks-cluster-name:sks-e2e-i6cer3-k8s-scale-groups 创建的时间为 2024-01-14 12:58:21.523,运行清理的时间为 2024-01-14T10:00:52Z,所以没有被删除。
sks-cluster-name:test3 被一个虚拟机引用,所以没有被删除。